import request from "@/utils/request.js";

// 登录
export function login(data) {
  return request({
    url: "/userManager/doLogin",
    method: "post",
    params: data,
  });
}

// 退出
export function logout(params) {
  return request({
    url: "/userManager/loginOut",
    method: "get",
    params,
  });
}

// 用户注册
export function registerUser(data) {
  return request({
    url: "/userManager/registerUser",
    method: "post",
    data,
  });
}

// 用户列表
export function getUserList() {
  return request({
    url: "/userManager/queryUserList",
    method: "get",
  });
}

// 用户详情
export function getUserInfo(params) {
  return request({
    url: "/userManager/userDetail",
    method: "get",
    params,
  });
}

// 修改用户详情
export function updateUserInfo(data) {
  return request({
    url: "/userManager/updateUserModel",
    method: "post",
    data,
  });
}

// 修改用户详情
export function delUserInfo(data) {
  return request({
    url: "/userManager/deleteBatchUser",
    method: "post",
    data,
  });
}

// 查询网站信息
export function querySite() {
  return request({
    url: "/querySite",
    method: "get",
  });
}

// 获取帮助pdf
export function getHelpPdfFile() {
  return request({
    url: `/book.pdf`,
    method: "get",
    responseType: "blob",
  });
}
